Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web3.js): add support for get stake minimum delegation #26682

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

atharmohammad
Copy link
Contributor

The PR adds --
1). support for getStakeMinimumDelegation to web3.js with a test.

fixes #26564

@mergify mergify bot added the community Community contribution label Jul 19, 2022
@mergify mergify bot requested a review from a team July 19, 2022 18:35
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #26682 (9178ded) into master (1165a7f) will decrease coverage by 4.4%.
The diff coverage is n/a.

❗ Current head 9178ded differs from pull request most recent head 9ae40f6. Consider uploading reports for the commit 9ae40f6 to get more accurate results

@@             Coverage Diff             @@
##           master   #26682       +/-   ##
===========================================
- Coverage    81.9%    77.4%     -4.5%     
===========================================
  Files         631       42      -589     
  Lines      174252     2459   -171793     
  Branches        0      353      +353     
===========================================
- Hits       142728     1905   -140823     
+ Misses      31524      422    -31102     
- Partials        0      132      +132     

@atharmohammad atharmohammad force-pushed the issue#26564 branch 4 times, most recently from ef8d7bf to 8602516 Compare July 20, 2022 18:44
Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

web3.js/src/connection.ts Outdated Show resolved Hide resolved
web3.js/test/connection.test.ts Outdated Show resolved Hide resolved
web3.js/test/stake-program.test.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed steveluscher’s stale review July 21, 2022 06:03

Pull request has been modified.

@mergify mergify bot requested a review from a team July 21, 2022 06:04
@atharmohammad atharmohammad marked this pull request as ready for review July 21, 2022 06:11
* get the stake minimum delegation
*/
async getStakeMinimumDelegation(
commitment?: Commitment,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close! I really did mean to take a config object here, even if for now it only contains a single property. This makes the method call future proof; if we need to add another property then we have a place to do it. There are other examples in this file of calls that take a config. Check it out!

Optional config, optional commitment property inside.

@mergify mergify bot dismissed steveluscher’s stale review July 21, 2022 19:53

Pull request has been modified.

@mergify mergify bot requested a review from a team July 21, 2022 19:53
Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to get stake minimum delegation from web3.js
2 participants